<template>
  <div class="container">
    <navbar
      :vaniconL="true"
      :noRight="true"
      :noLeft="false"
      :vaniconR="true"
      iconNameL="arrow-left"
      iconNameR="setting-o"
      @clickLeft="goBack"
    >{{$t('detailList.detail')}}</navbar>
    <div class="card">
      <div class="name">
        <img src="@/assets/images/medicine_box.png" alt />
        <span>****</span>
      </div>
      <van-divider content-position="center">{{$t('detailList.details')}}</van-divider>
      <div class="mes">
        <div class="box">
          <p>
            <span>{{$t('detailList.gender')}}:</span>***
            <!-- {{detailData.info ? detailData.info.gender == 1 ? '男':detailData.info.gender == 2 ? '女': '*':'--/--'}} -->
          </p>
          <p>
            <span>{{$t('detailList.medical_card_number')}}:</span>***
            <!-- {{detailData.info ? detailData.info.medicalCardId:'--/--'}} -->
          </p>
          <p>
            <span>{{$t('detailList.department')}}:</span>***
            <!-- {{detailData.info ? detailData.info.departmentName:'--/--'}} -->
          </p>
          <p>
            <span>{{$t('detailList.drug_allergy')}}:</span>***
            <!-- {{detailData.info ? detailData.info.remark:'--/--'}} -->
          </p>
        </div>
        <div class="box">
          <p>
            <span>{{$t('detailList.age')}}:</span>***
            <!-- {{detailData.info ? detailData.info.age:'--/--'}} -->
          </p>
          <p>
            <span>{{$t('detailList.hospital_name')}}:</span>***
            <!-- {{detailData.info ? detailData.info.hospitalName:'--/--'}} -->
          </p>
          <p>
            <span>{{$t('detailList.doctors')}}:</span>***
            <!-- {{detailData.info ? detailData.info.doctorName:'--/--'}} -->
          </p>
        </div>
      </div>
    </div>
    <van-divider class="line">DR扫描列表</van-divider>
    <p class="nettip">(建议在WIFI环境下调阅以节省流量)</p>
    <div class="list">
      <div class="child">
        <div class="left">
          <p class="num">1</p>
          <div class="date">
            <p>
              {{$t('detailList.test_type')}}:
              <span>乳腺钼靶</span>
            </p>
            <p>
              {{$t('detailList.upload_date')}}:
              <span>2020/9/22</span>
            </p>
            <p>
              {{$t('detailList.test_results')}}:
              <span>----</span>
            </p>
          </div>
        </div>
        <div>
          <van-button
            plain
            type="info"
            color="#4775d9"
            size="small"
            @click="toDetails"
          >{{$t('detailList.image_details')}}</van-button>
          <van-button
            plain
            type="info"
            color="#4775d9"
            size="small"
            @click="toReport"
          >{{$t('detailList.summary_report')}}</van-button>
        </div>
      </div>
    </div>
    <!-- <van-dialog
      v-model="formShow"
      title="注意"
      show-cancel-button
      @cancel="formCancel"
      @confirm="formConfirm"
    >
      <van-form>
        <van-field
          v-model="patientId"
          type="password"
          name="patientId"
          label="报告影像号"
          placeholder="请输入报告影像号"
          :rules="[{ required: true, message: '请填写报告影像号' }]"
        />
      </van-form>
    </van-dialog>-->
  </div>
</template>

<script>
import navbar from "@/components/navbar";
import { Toast } from "vant";
export default {
  name: "drList",
  components: { navbar },
  data() {
    return {
      patientId: "",
      formShow: true,
    };
  },
  computed: {},
  watch: {},
  methods: {
    // 返回上一页
    goBack() {
      this.$router.replace({ path: "/readList" });
    },
    //
    toDetails() {
      this.$router.push({
        path: "/drDetail",
      });
    },
    //
    toReport() {
      this.$router.push({
        path: "/drReport",
      });
    },

    // 输入id
    // formConfirm() {
    //   if (this.patientId == 456) {
    //     let toast1 = Toast.loading({
    //       message: this.$t("detailList.loading"),
    //       forbidClick: true,
    //       overlay: true,
    //     });
    //   } else {
    //     Toast.fail("影像号错误，请重新输入！");
    //     let toast1 = Toast.loading({
    //       message: this.$t("detailList.loading"),
    //       forbidClick: true,
    //       overlay: true,
    //     });
    //     setTimeout(() => {
    //       this.formShow = true;
    //     }, 1000);
    //   }
    // },
    // formCancel() {
    //   if (this.pId) {
    //     this.formShow = false;
    //   } else {
    //     this.formShow = false;
    //     this.goBack();
    //   }
    // },
  },
  created() {
    let toast1 = Toast.loading({
      message: this.$t("detailList.loading"),
      forbidClick: true,
      overlay: true,
    });
  },
  mounted() {},
  destroyed() {},
};
</script>
<style lang='scss' scoped>
.container {
  position: relative;
  height: 100vh;
  background: #f5f5f5;
  overflow-y: scroll;
  & .card {
    width: 94%;
    // height: 2rem;
    background: #ffffff;
    margin: 0 auto;
    margin-top: 10px;
    box-shadow: 0px 0px 10px #cccccc;
    & .van-divider {
      margin: 0;
    }
    & .name {
      text-align: left;
      padding: 10px 15px;
      & img {
        width: 0.3rem;
        height: 0.3rem;
        vertical-align: middle;
      }
      & span {
        height: 0.22rem;
        vertical-align: middle;
        color: #4973d7;
        font-weight: 600;
        margin-left: 0.1rem;
        font-size: 0.2rem;
        display: inline-block;
        width: 2rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
    & .mes {
      display: flex;
      justify-content: flex-start;
      padding-bottom: 15px;
      & .box {
        margin: 0 0.3rem 0 0.15rem;
        text-align: left;
        & p {
          & span {
            color: #8d898e;
            font-size: 0.14rem;
          }
          margin: 10px 0;
          font-size: 0.14rem;
        }
      }
    }
  }
  & .list {
    width: 94%;
    margin: 0 auto;
    & .child {
      background: #ffffff;
      display: flex;
      height: 100px;
      justify-content: space-between;
      align-items: center;
      padding: 0 15px;
      border-radius: 10px;
      box-shadow: 4px 4px 10px #cccccc;
      margin-bottom: 15px;
      & .left {
        display: flex;
        align-items: center;
        & .num {
          font-size: 14px;
          color: #4973d7;
        }
        & .date {
          text-align: left;
          margin-left: 15px;
          & p {
            font-size: 0.14rem;
            color: #999898;
            margin: 10px 0;
          }
          & span {
            font-size: 0.14rem;
            color: black;
          }
        }
      }
      & .van-button {
        display: block;
        margin-top: 5px;
      }
    }
  }
}
.line {
  margin: 0.16rem 0 0 0;
}
.nettip {
  color: #969799;
  font-size: 0.12rem;
  margin-bottom: 0.1rem;
}
</style>